<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学IT - 后台管理系统</title>
    <?php include( './views/common/style.html' ) ?>
</head>
<body>
    
    <!-- 侧边栏 -->
    <?php include( './views/common/aside.html' ) ?>
    <!-- 主体 -->
    <div class="main">
        <div class="container-fluid">
            <!-- 头部 -->
            <?php include( './views/common/header.html' ) ?>
            <div class="body teacher" id="addTeacher">
                <!-- 坑 -->
            </div>
        </div>
    </div>

    <script type="text/template" id="addTeacherTpl">
        <!-- 面包屑 -->
        <ol class="breadcrumb">
            <li><a href="javascript:;">讲师管理</a></li>
            <li class="active">{{ tc_way }}</li>
        </ol>
        <div class="teacher-add">
            <form id="addTeacherForm" class="form-horizontal col-md-offset-2">
                {{ if tc_id }}
                <input type="hidden" name="tc_id" value="{{ tc_id }}" />
                {{ /if }}
                <div class="form-group">
                    <label for="" class="col-md-3 control-label">姓名</label>
                    <div class="col-md-4">
                        <input type="text" 
                               class="form-control input-sm" 
                               placeholder="讲师名称"
                               name="tc_name"
                               value="{{ tc_name }}"
                               data-required
                               data-describedby="for_tc_name"
                               data-description="required">
                    </div>
                    <div id="for_tc_name"></div>
                </div>
                {{ if tc_name == null }}
                <div class="form-group">
                    <label for="" class="col-md-3 control-label">密码</label>
                    <div class="col-md-4">
                        <input type="password" 
                               class="form-control input-sm"
                               name="tc_pass"
                               data-required
                               data-describedby="for_tc_pass"
                               data-description="required">
                    </div>
                    <div id="for_tc_pass"></div>
                </div>
                {{ /if }}
                <div class="form-group">
                    <label for="" class="col-md-3 control-label">入职时间</label>
                    <div class="col-md-4">
                        <input type="text" 
                               class="form-control input-sm"
                               value="{{ tc_join_date }}"
                               name="tc_join_date"
                               data-provide="datepicker"
                               data-date-format="yyyy-mm-dd"
                               data-date-language="zh-CN"
                               data-required
                               data-describedby="for_tc_join_date"
                               data-description="required">
                    </div>
                    <div id="for_tc_join_date"></div>
                </div>
                <div class="form-group">
                    <label for="" class="col-md-3 control-label">类型</label>
                    <div class="col-md-2">
                        <select name="tc_type" class="form-control input-sm">

                            <option value="1"
                                    {{ if tc_type === 1 }}selected{{ /if }} >讲师</option>

                            <option value="0"
                                    {{ if tc_type === 0 }}selected{{ /if }} >管理员</option>


                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="" class="col-md-3 control-label">性别</label>
                    <div class="col-md-4">
                        <label class="radio-inline">
                <input type="radio"
                name="tc_gender"
                value="0"
                {{ tc_gender - 0 === 0 || tc_gender === undefined ? 'checked' : '' }} > 男
                        </label>
                        <label class="radio-inline">
                <input type="radio"
                name="tc_gender"
                value="1"
                {{ tc_gender - 0 === 1 ? 'checked' : '' }} > 女
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-7">
                        <input  type="submit"
                                class="btn btn-success btn-sm pull-right"
                                value="{{ tc_btn_value }}"
                        >
                    </div>                          
                </div>
            </form>
        </div>
    </script>



    <?php include( './views/common/script.html' ) ?>
    <script>    

        require( [ 'teacherAdd' ] );

    </script>
</body>
</html>